home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2007 December / PCWKCD1207B.iso / Windows marzen / Macro ToolsWorks 6.31 / tworks.exe / Samples / Process lines in text file.mcr < prev    next >
Text File  |  2003-06-12  |  674b  |  27 lines

  1. <#> 
  2. <#> This sample process lines in text file
  3. <#> 
  4. <cmds>
  5.  
  6. <var_oper>(vFile,"",SELECT_FILE,"Select File","", "0")
  7. <if_str>("_vCanceled==1")<exitmacro><endif>
  8.  
  9. <data_load>("vbTemp_FileText","%vFile%","")
  10. <if_str>("_vErr==NO")
  11.    <var_oper>(vbTemp_NumOfLines,"vbTemp_FileText",TEXT_GET_NUMOFLINES,"","", "0")
  12.    <begloop>(vbTemp_NumOfLines)
  13.       <var_oper>(vbLine,"vbTemp_FileText",TEXT_GET_LINE,"_vLoopCounter","", "0")
  14.       <msg>(-100,-100,"INSTEAD OF THIS MESSAGE, YOU CAN DO YOUR OWN FILE LINE PROCESSING.
  15.  
  16. Line number:
  17. %_vLoopCounter%
  18.  
  19. Line content:
  20. %vbLine%
  21. ","Message",1)
  22.    <endloop>
  23. <else>
  24.    <msg>(100,100,"_vError","Error",1)
  25. <endif>
  26.  
  27.